package com.chb.controller;

import com.chb.model.entity.StaffTransfer;
import com.chb.model.vo.Result;
import com.chb.model.vo.StaffTransferVO;
import com.chb.service.StaffExService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：张家琪
 * @date ：Created in 2023/10/10 15:35
 * @description：员工审核
 * @modified By：
 * @version: 1.0
 */
@RestController
@RequestMapping("/staffEx")
public class StaffExController {

    @Autowired
    private StaffExService staffExService;


    /**
     * @param
     * @return com.chb.model.vo.Result
     * @create by: 张77
     * @description: 获取员工审核的所有数据
     * @create time: 2023/10/10 15:37
     */
    @GetMapping("/getAllInfo")
    public Result getAllInfo(Integer current, Integer pageSize, Integer branchid) {
        return staffExService.getAllInfo(current, pageSize, branchid);
    }

    @GetMapping("/getAllBranch")
    public Result getAllBranch() {
        return staffExService.getallBranchName();
    }


    /**
     * @param staffTransfer
     * @return com.chb.model.vo.Result
     * @create by: 陈海彬
     * @description: 进行入库审核
     * @create time: 2023/10/12 15:42
     */
    @PostMapping("/updateStatus")
    public Result updateStatus(@RequestBody StaffTransfer staffTransfer) {
        return staffExService.updateStatus(staffTransfer);
    }
}